package com.beans;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 学生信息实体类
 * @author wyj
 */
@Data
@Entity
@Table(name = "student_information")
public class StudentInformationEntity  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "assigned")
    @GenericGenerator(name="assigned", strategy = "assigned")
    private Long id;


    /** 所属专业班级 */
    private Long pid;

    /** '姓名' */
    private String name;

    /** '性别' */
    private String sex;

    /** '身份证号' */
    private String sfz;

    /** '考号或学号' */
    private String kaohao;

    /** '头像' */
    private String headSculpture;

    /** '创建时间' */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** '最后登录时间' */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastloginTime;

    /** '状态：1正常，2休学，3当兵，4退学，5停考' */
    private Integer status;

    /** '备注' */
    private String remarks;
}
